<h4>Filter by Popular Tags</h4>

<%=

update_blog_list("clear tag selection", {:cleartags=>"true"})
 
%>
<br/>
(
<% if(session[:combinetype] == "any") %>
&lt;any&gt;/
<%=
update_blog_list("all", {:combinetype=>"all"})
%>
<% else %>
    <%=
        update_blog_list("any", {:combinetype=>"any"})
%>
    /&lt;all&gt;
<% end %>
)
<br/>

<%
    @tags.each do |tag| 
      if session[:tags].include?(tag.name)
%>
<%=
update_blog_list(tag.name, {:tag_id=>tag.id.to_s, :tag_name=>tag.name},"tag"+((tag.tagged.size.to_f/@top_tag_count.to_f)*7).ceil.to_s, "selected_tag")
%>
<% else %>
    <%=
    update_blog_list(tag.name, {:tag_id=>tag.id.to_s, :tag_name=>tag.name}, "tag"+((tag.tagged.size.to_f/@top_tag_count.to_f)*7).ceil.to_s)

%>
    <% end # for if %>
<% end %>
